<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <input type="text" placeholder=" " id="menu">
    <input type="button" value="吃啥呢小老弟" id="btn">
</body>
<script>
    function all(arr){
        var num = parseInt( Math.random() * arr.length)//0~length-1
        return num; 
    }
    var menu = document.getElementById('menu');
    var arr = ['太极白玉翡翠羹','剁椒鱼头','小炒肉','苏杭醉蟹','砂锅小排骨'];
    var btn = document.getElementById('btn');
    btn.onclick = function(){
        var a = all(arr);
        menu.value = arr[a];
    }
</script>
</html>